// @ts-ignore
import { api } from '@/utils/api';

/** 新增系统配置分组数据 POST /sysWebSystemConfigGroup/add */
export async function sysWebSystemConfigGroupAdd(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupAdd(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysWebSystemConfigGroupAdd(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupAdd(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除系统配置分组数据 POST /sysWebSystemConfigGroup/delete */
export async function sysWebSystemConfigGroupDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysWebSystemConfigGroupDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统配置分组VO数据 POST /sysWebSystemConfigGroup/getVo */
export async function sysWebSystemConfigGroupGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultSysWebSystemConfigGroupVO>;

export async function sysWebSystemConfigGroupGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultSysWebSystemConfigGroupVO>>;

export async function sysWebSystemConfigGroupGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultSysWebSystemConfigGroupVO>;

export async function sysWebSystemConfigGroupGetVo(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultSysWebSystemConfigGroupVO>(`/app/sysWebSystemConfigGroup/getVo`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultSysWebSystemConfigGroupVO>(`/app/sysWebSystemConfigGroup/getVo`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 更新系统配置分组数据 POST /sysWebSystemConfigGroup/update */
export async function sysWebSystemConfigGroupUpdate(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupUpdate(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function sysWebSystemConfigGroupUpdate(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function sysWebSystemConfigGroupUpdate(
  body: BASE.SysWebSystemConfigGroup,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/sysWebSystemConfigGroup/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统配置分组VO列表 POST /sysWebSystemConfigGroup/voList */
export async function sysWebSystemConfigGroupVoList(
  body: BASE.SysWebSystemConfigGroupQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultListSysWebSystemConfigGroupVO>;

export async function sysWebSystemConfigGroupVoList(
  body: BASE.SysWebSystemConfigGroupQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultListSysWebSystemConfigGroupVO>>;

export async function sysWebSystemConfigGroupVoList(
  body: BASE.SysWebSystemConfigGroupQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultListSysWebSystemConfigGroupVO>;

export async function sysWebSystemConfigGroupVoList(
  body: BASE.SysWebSystemConfigGroupQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultListSysWebSystemConfigGroupVO>(`/app/sysWebSystemConfigGroup/voList`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultListSysWebSystemConfigGroupVO>(`/app/sysWebSystemConfigGroup/voList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
